package com.fs.base.pojo;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Entity
@Table(name="s_role_right")
@Data@EqualsAndHashCode(callSuper=false)
@AllArgsConstructor
@NoArgsConstructor
public class RoleRight extends PkEntity {
	private String roleId;
	private String menuMotionId;
	
	public static List<RoleRight> formatData(String roleId,String[] menuMotion){
		List<RoleRight> list = new ArrayList<RoleRight>();
		for(String menuMotionId: menuMotion){
			list.add(new RoleRight(roleId,menuMotionId));
		}
		return list;
	}

}
